import request from '@/utils/request';

/**
 * 分页查询
 * @param params
 * @returns {*}
 */
export function queryAllByPager(params) {
  return request({
    url: 'rest/api/manager/v1/service/group/pager',
    method: 'get',
    params
  });
}

export function queryAll() {
  return request({
    url: 'rest/api/manager/v1/service/group/blurry?state=true',
    method: 'get'
  });
}

/**
 * 保存
 * @param data
 * @returns {*}
 */
export function saveObject(data) {
  return request({
    url: 'rest/api/manager/v1/service/group/save/entity',
    method: 'post',
    data
  });
}

/**
 * 更新
 * @param data
 * @returns {*}
 */
export function updateObject(data) {
  return request({
    url: 'rest/api/manager/v1/service/group/update/entity',
    method: 'post',
    data
  });
}

/**
 * 删除
 * @param data
 * @returns {*}
 */
export function delObject(data) {
  return request({
    url: 'rest/api/manager/v1/service/group/del',
    method: 'post',
    data
  });
}

export function queryEntity(params) {
  return request({
    url: 'rest/api/manager/v1/service/group/entity',
    method: 'get',
    params
  });
}

export function queryGuestEntity(params) {
  return request({
    url: 'rest/api/guest/query/v1/service/group/entity',
    method: 'get',
    params
  });
}
